import request from '@/utils/request'

// ----------------------------------------------------------------------------------
// 月卡管理API开始
// ----------------------------------------------------------------------------------

// 获取月卡信息列表
export const getCardListAPI = params => request({
  url: '/parking/card/list',
  params
})

// 添加月卡
export const addCardAPI = data => request({
  url: '/parking/card',
  method: 'POST',
  data
})

// 获取编辑页面-月卡详情
export const getCardDetailAPI = id => request({
  url: `/parking/card/detail/${id}`
})

// 编辑月卡
export const editCardAPI = data => request({
  url: '/parking/card/edit',
  method: 'PUT',
  data
})

// 删除月卡
export const delCardAPI = id => request({
  url: `/parking/card/${id}`,
  method: 'DELETE'
})

// ----------------------------------------------------------------------------------
// 月卡管理API结束
// ----------------------------------------------------------------------------------

// ----------------------------------------------------------------------------------
// 计费规则管理API开始
// ----------------------------------------------------------------------------------

// 获取计费规则列表
export const getRuleListAPI = params => request({
  url: '/parking/rule/list',
  params
})

// 添加计费规则
export const addRuleAPI = data => request({
  url: '/parking/rule',
  method: 'POST',
  data
})

// ----------------------------------------------------------------------------------
// 计费规则管理API结束
// ----------------------------------------------------------------------------------
